<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="__static__/admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="__static__/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__static__/admin/js/jquery.js"></script>
<script type="text/javascript" src="__static__/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__static__/admin/js/select-ui.min.js"></script>
<script type="text/javascript" src="__static__/share/js/custom.min.js"></script>
<script language="javascript">
    $(document).ready(function(){
        $(".click").click(function(){
        $(".tip").fadeIn(200);
        });
        
        $(".tiptop a").click(function(){
        $(".tip").fadeOut(200);
        });

        $(".sure").click(function(){
        $(".tip").fadeOut(100);
        });

        $(".cancel").click(function(){
        $(".tip").fadeOut(100);
        });

        $(".select1").uedSelect({
            width : 345			  
        });
        $(".select2").uedSelect({
            width : 167  
        });
        $(".select3").uedSelect({
            width : 100
        });
    });
</script>
</head>


<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">图片列表</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
        <ul class="toolbar">
            <li class="click" onclick="excelExport()"><span><img src="__static__/admin/images/t02.png" /></span>导出</li>
            <li onclick="printingData()"><span><img src="__static__/admin/images/t04.png" /></span>打印</li>
        </ul>
    </div>
        <form method="get" action="{:url('index')}" >

            <ul class="seachform">
        
                <li><label>搜索用户名</label><input type="text" name="Uname" value="{$Uname}" class="scinput" /></li>
                <li><label>零钱余额</label>  
                <div class="vocation">
                <select class="select3" name="Smallchange">
                    <option value="0">默认</option>
                    <option value="1" {if $Smallchange EQ 1} selected{/if}>顺序</option>
                    <option value="2" {if $Smallchange EQ 2} selected{/if}>倒序</option>
                </select>
                </div>
                </li>
                
                <li>
                    <label>加入时间：</label><input name="StarAddTime" type="date" class="scinput" value="{$StarAddTime}"/>-<input name="EndAddTime" type="date" class="scinput" value="{$EndAddTime}"/>
                    <div class="vocation">
                    <select class="select3" name="AddTimeSort">
                        <option value="0">默认</option>
                        <option value="1" {if $AddTimeSort EQ 1} selected{/if}>顺序</option>
                        <option value="2" {if $AddTimeSort EQ 2} selected{/if}>倒序</option>
                    </select>
                    </div>
                </li>
                <li>
                    <label>登录时间：</label><input name="StarLandTime" type="date" class="scinput" value="{$StarLandTime}"/>-<input name="EndLandTime" type="date" class="scinput" value="{$EndLandTime}"/>
                    <div class="vocation">
                    <select class="select3" name="LandTimeSort">
                        <option value="0">默认</option>
                        <option value="1" {if $LandTimeSort EQ 1} selected{/if}>顺序</option>
                        <option value="2" {if $LandTimeSort EQ 2} selected{/if}>倒序</option>
                    </select>
                    </div>
                </li>
                <li><label>审核状态</label>  
                <div class="vocation">
                <select class="select3" name="State">
                    <option value="0">全部</option>
                    <option value="1" {if $State EQ 1} selected{/if}>已审核</option>
                    <option value="2" {if $State EQ 2} selected{/if}>待审核</option>
                </select>
                </div>
                </li>
                <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>   
            </ul>
        </form>
    
    
    <table class="imgtable">
    
    <thead>
    <tr>
      <th width="100px;">头像</th>
      <th>用户名</th>
      <th>联系方式</th>
      <th>最近登陆时间</th>
      <th>是否审核</th>
      <th>零钱</th>
      <th>操作</th>
    </tr>
    </thead>
    
    <tbody>
    {foreach $user_list as $v}
    <tr>
      <td class="imgtd"><img src="{$v.Head_portrait}" /></td>
      <td><a href="#">{$v.Username}</a><p>ID: {$v.Openid}</p></td>
      <td>{$v.Contact}<p>加入时间：{:date('Y-m-d H:i:s',$v.Addtime)}</p></td>
      <td>{:date('Y-m-d H:i:s',$v.Land_time)}</td>
      <td>{$v.State|getAllToexamine}</td>
      <td>{$v.Smallchange}</td>
      <td>
          <a href="{:url('card',array('id'=>$v.id))}" class="tablelink">名片</a>  
          <a href="javascript:;toexamineUser({$v.id},{$v.State})" class="tablelink">审核</a>    
          <a href="javascript:;deleteUser({$v.id})" class="tablelink"> 删除</a>
      </td>
    </tr>
    {/foreach}
    
    </tbody>
    
    </table>
    
    
    
    
    
   
    <div class="pagin">
    	<div class="message">共<i class="blue">{$pageListr->total()}</i>条记录，当前显示第&nbsp;<i class="blue">{$pageListr->currentPage()}&nbsp;</i>页</div>
        {$pageListr->render()}
    </div>
    
    
    
 <script type="text/javascript">
    function deleteUser(id){
        if(!confirm('确认删除此用户所有数据？')) return false;
        $.post('{:url("deleteUser")}',{id:id},function(res){
            console.log('返回数据',res)
            alert(res.msg)
            if(res.code) window.location.reload();
        })
    }
    function toexamineUser(id,sta){
        $.post('{:url("toexamineUser")}',{id:id,sta:sta},function(res){
            console.log('返回数据',res)
            alert(res.msg)
            if(res.code) window.location.reload();
        })
    }
    function editUser(id){
        var nme = $('#MenuName'+id).val();
        var sto = $('#MenuSort'+id).val();
        $.post('{:url("editUser")}',{id:id,nme:nme,sto:sto},function(res){
            console.log('返回数据',res)
            alert(res.msg)
            if(res.code) window.location.reload();
        })
    }
	</script>
</body>
</html>
